/**************************************************************************************
 * Date 		By				Description
 * ------------------------------------------------------------------------------------
 * 03-20-07		Noah V			Created
 *
 **************************************************************************************/

namespace NAFx.Base
{
    /// <summary>
    /// Class implementing this interface should be able to create new instance
    /// from an existing instance.	Whether the newly created instance inherits
    /// any property from the parent instance is up to the implementation.
    /// The main purpose of having this interface is to avoid repeated reflection
    /// calls when an instance is to be created from a class name.
    /// </summary>
    public interface IConstructable
    {
        /// <summary>
        /// Create a new instance of the same type,
        /// used to avoid repeated reflection call.
        /// If the class is thread-safe, return this instead of a new instance.
        /// </summary>
        object CreateInstance();
    }
}
